﻿@model Pre.CRM.Models.CustomerContactModel
@{
    ViewBag.Title = "Contact";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<label class="lb_namecompany">@Model.Id</label>
<a name="" type="button" value="" class="bt_black" width="26"  height="26" href='javascript:history.back();'></a>
<form method="POST">
    <table class="border_top" width="100%" border="0" cellspacing="5" cellpadding="0" style="display:block; clear:both; margin-top:10px;">
        <tr>
            <td colspan="2"><strong>Nhập thông tin liên hệ</strong></td>
        </tr>
        <tr>
            <td width="140">Hình thức liên hệ</td>
            <td width="165">
                <select class="input_contact" name="method">
                    @foreach (var method in Model.ContactMethods)
                    {
                        <option value="@method.Name">@method.Name</option>
                    }
                </select>
            </td>
        </tr>
        <tr>
            <td width="140">Lý do liên hệ</td>
            <td><select class="input_contact" name="reason">
                    @foreach (var reason in Model.ContactReasons)
                    {
                        <option value="@reason.Id">@reason.Name</option>
                    }
                </select></td>
        </tr>
        <tr>
            <td>Chú ý</td>
            <td><textarea name="note" class="textarea_input_contact"></textarea></td>
        </tr>
        <tr>
            <td height="34">&nbsp;</td>
            <td><input name="save" type="submit"  value="LƯU" class="bt_contact_save"  /></td>
        </tr>
    </table>
    <input type="hidden" name="customer" value="@Model.Id"/>
</form>
<table class="border_top" width="100%" border="0" cellspacing="5" cellpadding="0" style="display:block; clear:both; margin-top:10px;">
    <tr>
        <td colspan="2"><strong>Những lần liên hệ trước</strong></td>
    </tr>
    @foreach (var contact in Model.Contacts)
    {
        <tr>
            <td colspan="2" class="border_bottom"></td>
        </tr>
        <tr>
            <td>Date:</td>
            <td>@contact.Date</td>
        </tr>
        <tr>
            <td>User:</td>
            <td>@contact.UserName</td>
        </tr>
        <tr>
            <td>From:</td>
            <td>@contact.ContactFrom</td>
        </tr>
        <tr>
            <td>Reason:</td>
            <td>@contact.Reason</td>
        </tr>
        <tr>
            <td>Note:</td>
            <td>@contact.Note</td>
        </tr>
    }
</table>
<div class="space"></div>

